package org.carl.component.job.enums

/**
 * @author xuxueli 2020-10-29 21:11:23
 */
enum class MisfireStrategyEnum(val title: String) {
    /**
     * do nothing
     */
    DO_NOTHING("忽略"),

    /**
     * fire once now
     */
    FIRE_ONCE_NOW("执行一次");

    companion object {
        fun match(name: String, defaultItem: MisfireStrategyEnum): MisfireStrategyEnum {
            for (item in values()) {
                if (item.name == name) {
                    return item
                }
            }
            return defaultItem
        }
    }

}